home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / msdos / cdd / cdd.c next >
Text File  |  1991-10-18  |  326b  |  24 lines

  1. #include    <string.h>
  2. #include    <stdio.h>
  3. #include    <dir.h>
  4. #include    <ctype.h>
  5.  
  6. main(int argc,char* argv[])
  7. {
  8.     int    a;
  9.     char    c[32];
  10.     if(argc != 2)
  11.     {
  12.         puts("cdd [drive:]pathname");
  13.         exit(1);
  14.     }
  15.     strcpy(c,argv[1]);
  16.     if (c[1] == ':')
  17.     {
  18.         c[0] = toupper(c[0]);
  19.         a = c[0]-'A';
  20.         setdisk(a);
  21.     }
  22.     chdir(c);
  23. }
  24.